author: “Journ Galvan” date: “4/23/2020” output: html_document —
Data was filtered to only include invertebrates identified in coral colonies. These were identified down to the species level. Species richness, abundance and Shannon weiner diversity index was calculated.
Cleaned data of coral colonies taken from the field and using photogrammetry techniques were combined into one dataframe. Many more and accurate morphological measurements could be acquired using photogrammetry than with traditional measurements taken *in situ. Common measurements of volume, surface area and available space known as interstitial space were calculated of each coral colonly.
Available space was traditionally measured using 2D measurements of five randomly selected branch distances and averaging them. In this experiment, we took methods used by Neil E. Doszpot et al. to calculate a 3D measurement of available space using convex hull geometry and the software estimated coral volume.
Because we did not take random branch distance measurements in the field, we used the software models to randomly select branch distances to be averaged.
Three other measurements were calculated from the coral models: convexity and sphericity which capture volume compactness and packing which captures how much of an objects surface area is situated internally versus externally.
Wide or tight branching corals were initially qualitatively determined. However, classifying corals with convexity values \(>= 0.5\) as “tight” and \(< 0.5\) as “wide” offers another method of classifying coral morphology. For the rest of these tests, we will classify “wide” and “tight” branching corals using this method.
Dataframes were combined and seperate columns created for log and square root transformations.
Look for unimodal or bimodal curve in data for average branch distance, interstitial space and convexity. Compare these curves to branch distances defined in the field to branch distances defined by convexity measuremnt of 0.5
Non-transformed and transformed morphological measurements correlated using *pairs.panels().
Log transformed field and software estimated volume and log transformed software estimated SA and interstitial space are all highly correlated to eachother. Packing is also highly correlated to volume and SA.
Here, we want to compare the differences between our software and manual measurements of volume, height, length and width. Manual measurements for coral volume were estimated from an elipsoid.
Since the corals are not independent, that is, they were taken on the same coral but with different methods, we will consider a paired t-test with dependent samples. Height, length and width measurements are also subjective since they may have been taken from different areas on the coral. We will first check for normallity assumptions. Normality will be checked with a qqplot.
##
## Paired t-test
##
## data: dim_bind$sqrt_volume_pg and dim_bind$sqrt_volume_field
## t = -8.7044, df = 58, p-value = 4.091e-12
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -30.32779 -18.98700
## sample estimates:
## mean of the differences
## -24.65739
##
## Paired t-test
##
## data: dim_bind$height_pg and dim_bind$height_field
## t = -5.1446, df = 58, p-value = 3.32e-06
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.835609 -1.247079
## sample estimates:
## mean of the differences
## -2.041344
##
## Paired t-test
##
## data: dim_bind$length_pg and dim_bind$length_field
## t = -0.93279, df = 58, p-value = 0.3548
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.0463083 0.3811287
## sample estimates:
## mean of the differences
## -0.3325898
##
## Paired t-test
##
## data: dim_bind$width_pg and dim_bind$width_field
## t = -3.7184, df = 58, p-value = 0.0004538
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.973207 -0.592183
## sample estimates:
## mean of the differences
## -1.282695
We reject the null hypothesis that the true difference in means is equal to zero for all measurements except for length.
The below graphs compare the software estimated volume, height, length and width measurements to the same coral’s manual measurements. A one to one line was fit to show how differences in measuremets vary with increasing coral size.
The below graphs compare the squareroot transformed software estimated volume to the same coral’s squareroot transformed elipsoid volume. A one to one line was fit to show how differences in measuremets vary with increasing coral size.
The below graphs represent how invertebrate abundance relates to both volume measurements. We will test how well our software estimated method of calculating volume and interstitial space relates to invertebrate counts. We will first assess \(p<0.05\) to test if the linear regression slope was significantly different from zero. Correlation of dependent and independent variables \(R^2\) was also included in the tables.
| Invertebrate abundance | ||||
|---|---|---|---|---|
| Predictors | Estimates | std. Error | CI | p |
| Intercept | 13.69 | 3.09 | 7.36 – 20.03 | <0.001 |
| elipsoid volume | 0.00 | 0.00 | 0.00 – 0.00 | 0.043 |
| Observations | 29 | |||
| R2 / R2 adjusted | 0.143 / 0.111 | |||
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 0.31 | -0.92 – 1.54 | 0.606 |
| Log elispoid V | 0.28 | 0.14 – 0.43 | <0.001 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.372 / 0.348 | ||
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 11.55 | 5.54 – 17.55 | 0.001 |
| software est. volume | 0.00 | 0.00 – 0.00 | 0.004 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.275 / 0.248 | ||
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 0.44 | -0.67 – 1.56 | 0.424 |
| Log software est. V | 0.30 | 0.15 – 0.44 | <0.001 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.391 / 0.369 | ||
The below graphs represent how invertebrate species richness relates to both volume measurements. We will test how well our software estimated method of calculating volume and interstitial space relates to species richness. We will first assess \(p<0.05\) to test if the linear regression slope was significantly different from zero. Correlation of dependent and independent variables \(R^2\) was also included in the tables.
| Invertebrate richness | ||||
|---|---|---|---|---|
| Predictors | Estimates | std. Error | CI | p |
| Intercept | 6.25 | 0.86 | 4.49 – 8.01 | <0.001 |
| elipsoid volume | 0.00 | 0.00 | 0.00 – 0.00 | 0.011 |
| Observations | 29 | |||
| R2 / R2 adjusted | 0.218 / 0.189 | |||
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 0.19 | -0.69 – 1.07 | 0.661 |
| Log elispoid V | 0.21 | 0.11 – 0.32 | <0.001 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.391 / 0.369 | ||
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 5.88 | 4.15 – 7.61 | <0.001 |
| software est. volume | 0.00 | 0.00 – 0.00 | 0.003 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.291 / 0.265 | ||
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 0.30 | -0.50 – 1.10 | 0.448 |
| Log software est. V | 0.22 | 0.11 – 0.32 | <0.001 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.405 / 0.383 | ||
When comparing elipsoid volume to software estimated volume for invertebrate richness, we see significant p-values for both as represented in the above tables. Software estimated volume measurements and invert. richness show a lower p value indicating a greater slope from zero as well as having a higher correlation \(R^2\) value. When data was log transformed, there was little to no difference in p-values or correlation. All slopes are less than zero suggesting a logistic growth model fit for invert abundance with increasing volume. When comparing the slopes for software volume \(b=5.051e-4\) and manual volume \(b=1.862e-4\), we see that software volume shows a more linear fit.
Software estimated available space calculated from convex hull and coral volume was related to invertebrate abundance. The same was repeated for the traditional method of average branch distance.
Dependent and independent variables were also compared after being log transformed.
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 16.01 | 9.85 – 22.17 | <0.001 |
| IS | 0.00 | -0.00 – 0.00 | 0.250 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.049 / 0.013 | ||
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 0.56 | -0.59 – 1.70 | 0.329 |
| Log IS | 0.28 | 0.13 – 0.43 | 0.001 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.354 / 0.330 | ||
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 17.06 | 5.45 – 28.66 | 0.006 |
| Avg. branch width | 0.60 | -5.02 – 6.21 | 0.829 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.002 / -0.035 | ||
| Invertebrate abundance | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 2.54 | 2.10 – 2.98 | <0.001 |
| Log avg. width | 0.23 | -0.42 – 0.87 | 0.476 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.019 / -0.017 | ||
Log transformed data appeared to not violate normality assumptions so was used in this analysis. Relating interstitial space to invertebrate abundance gave a signficant p-value while average width did not. The difference in p-values and \(R^2\) correlation values were significant. This may provide evidence to average branch width not adequately capturing available space for invertebrates when compared to a 3D software estimated measurement.
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 6.83 | 5.11 – 8.54 | <0.001 |
| IS | 0.00 | -0.00 – 0.00 | 0.053 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.131 / 0.099 | ||
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 0.33 | -0.47 – 1.14 | 0.403 |
| Log IS | 0.21 | 0.11 – 0.32 | <0.001 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.390 / 0.368 | ||
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 6.50 | 3.17 – 9.83 | <0.001 |
| Avg. branch width | 0.73 | -0.88 – 2.34 | 0.361 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.031 / -0.005 | ||
| Invertebrate richness | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| Intercept | 1.81 | 1.50 – 2.13 | <0.001 |
| Log avg. width | 0.25 | -0.22 – 0.71 | 0.285 |
| Observations | 29 | ||
| R2 / R2 adjusted | 0.042 / 0.007 | ||
Log transformed data appeared to not violate normality assumptions so was used in this analysis. Relating interstitial space to invertebrate richness gave a signficant p-value while average width did not. The difference in p-values and \(R^2\) correlation values were significant. This may provide evidence to average branch width not adequately capturing available space for invertebrates when compared to a 3D software estimated measurement.
Visualize data using boxplots.
Data was log transformed except for diversity so as not to violate normality assumptions. It appears that there is no difference in abundance, species richness or diversity.
Before conducting a two sample t-test we checked for normality using qq-plots and Shapiro Wilk test and a Levene’s test for equal variance.
With a \(p>0.05\) we fail to reject the null hypothesis that our data is normally distributed for wide branching corals. With a \(p<0.05\) we reject the null hypothesis that our data is normally distributed for tight branching corals. Because we are working with smaller data sets, we cannot use the central limit theorem.
With a \(p>0.05\) we fail to reject the null hypothesis that our data is normally distributed for tight and wide branching corals. Both groups of corals that have tight and wide branching morphologies have equal variance.
Because tight branching coral is not normally distributed, we could either perform a transformation or non-parametric test. We will try log transforming our data first. A column log transforming the number of inverts has already been created
With a \(p>0.05\) we fail to reject the null hypothesis that the difference between the means of the log transformed invert counts are different from zero.
Fit a single variable Yi=β0+β1Xi+ϵi or multivariable linear model Y=β0+β1X1+β2X2+…+βnXn+ϵ to our data using different combinations of explanatory variables. Our response variable will be abundance of invertebrates. We will use AIC and R-squared values to determine the best fit model.
Log transformation appears normal. Log transformed volume, surface area, interstitial space, and packing were morphological measurements that had a positive correlation to number of cafi. Log transformed sphericity has a negative correlation to cafi. Because our data does not contain any 0 counts for invertebrate (meaning every coral contained an invertebrate population) we applied a log transformation to our count data.
Linear models will be fit to all corals as well as subset to tight and wide branching morphotypes.
VIF>10 will be removed from the dataset
We fail to reject the null hypothesis that our residuals are normally distributed.
A step AIC will determine a parsimonious model
We will compare our log transformed poisson general linear model with a quasi-poisson general linear model with non-log transformed counts.